<html>
<head><meta charset="utf-8"><title>lang items in tests · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/lang.20items.20in.20tests.html">lang items in tests</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="192993976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/lang%20items%20in%20tests/near/192993976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/lang.20items.20in.20tests.html#192993976">(Apr 06 2020 at 04:15)</a>:</h4>
<p>Where should lang items live in tests? I implemented a first draft of Sized, but adding a <code>#[lang(sized)] trait Sized {}</code> in every test with wf checks seems very annoying. Should trait wf checks be on only if a corresponding lang item is defined?</p>



<a name="193000899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/lang%20items%20in%20tests/near/193000899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/lang.20items.20in.20tests.html#193000899">(Apr 06 2020 at 06:54)</a>:</h4>
<p>Turns out almost no tests have structs with fields, so Sized lang item is required very rarely (only one test is affected). The general question still stands though</p>



<a name="193093110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/lang%20items%20in%20tests/near/193093110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/lang.20items.20in.20tests.html#193093110">(Apr 06 2020 at 19:58)</a>:</h4>
<p>I am inclined to think "yes", but I wonder if we could build that into the test functions</p>



<a name="193093118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/lang%20items%20in%20tests/near/193093118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/lang.20items.20in.20tests.html#193093118">(Apr 06 2020 at 19:58)</a>:</h4>
<p>e.g. maybe they inject some standard traits</p>



<a name="193093789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/lang%20items%20in%20tests/near/193093789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/lang.20items.20in.20tests.html#193093789">(Apr 06 2020 at 20:03)</a>:</h4>
<p>Although .. hmm. =)</p>



<a name="193093871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/lang%20items%20in%20tests/near/193093871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/lang.20items.20in.20tests.html#193093871">(Apr 06 2020 at 20:04)</a>:</h4>
<p>Well, I think it's probably right, since it allows us to tinker with aspects of their definition (e.g., super traits and things)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>